package io.gitee.yth.design.pattern.test.core.pattern.behavioral.mediator;

/**
 * @author yth
 * @since 2023-05-01-16:36
 */
public class CheckBox extends Widget {

    private boolean isChecked = false;

    public CheckBox(ActionListener actionListener) {
        super(actionListener);
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void checkChanged() {
        isChecked = !isChecked;
        super.changed(isChecked);
    }

}
